package com.wanbangee;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;


@Configuration
public class BeanConfig {

	@Bean
	public FilterRegistrationBean registerFilter() {

		FilterRegistrationBean frBean = new FilterRegistrationBean();

		frBean.addUrlPatterns("/*");

		frBean.setFilter(new URLFilter());

		return frBean;

	}

	@Bean
	public HiddenHttpMethodFilter getHiddenHttpMethodFilter(){
		return new HiddenHttpMethodFilter();
	}
	
}
